Skip to content

[stable8] fix(NcRichText): do not render invalid relative markdown links#8467

Draft
backportbot[bot] wants to merge 2 commits intostable8from
backport/8397/stable8
Draft

[stable8] fix(NcRichText): do not render invalid relative markdown links#8467
backportbot[bot] wants to merge 2 commits intostable8from
backport/8397/stable8

Conversation

@backportbot
Copy link
Copy Markdown

@backportbot backportbot Bot commented Apr 23, 2026

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot Bot added bug Something isn't working 3. to review Waiting for reviews feature: richtext Related to the richtext component labels Apr 23, 2026
@backportbot backportbot Bot added this to the 8.38.0 milestone Apr 23, 2026
@Antreesy Antreesy force-pushed the backport/8397/stable8 branch from a36081e to 16f1b7a Compare April 23, 2026 13:34
@Antreesy Antreesy changed the base branch from stable8 to backport/8449/stable8 April 23, 2026 13:35
Base automatically changed from backport/8449/stable8 to stable8 April 23, 2026 14:09
- add noExtDecoration prop for reusing the component

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- still works: external links, internal absolute links, and internal relative links, that do have a router match for current app
- internal relative links without match (also ?query and #anchor) only render an inner text
- allow tel: and mail: to reduce breaking changes

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy force-pushed the backport/8397/stable8 branch from 16f1b7a to 887f74c Compare April 23, 2026 14:33
@Antreesy Antreesy marked this pull request as ready for review April 23, 2026 14:34
@Antreesy
Copy link
Copy Markdown
Contributor

autolink: true, useMarkdown: false renders as:

text:

    **Testwith** a ~~link~~ *to* [Link](
                https://example:1337
        ) - go visit it <div class="rich-text--wrapper">

html:

      <div>**Testwith** a ~~link~~ *to* [Link](<a href="https://example:1337" rel="noopener noreferrer" target="_blank" class="externalLink externalLink_decorated rich-text--component">
          https://example:1337
        </a>) - go visit it</div>
    </div>

@Antreesy Antreesy marked this pull request as draft April 23, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working feature: richtext Related to the richtext component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant